import http from '@/utils/http'
export const getCateListApi = async (data) => {
  const url = '/api/catelist'
  return http.get(url,{ params :{ istree:data}})
}

export const addSpecsApi = async (data) => {
  const url = '/api/specsadd'
  return http.post(url,data)
}

export const getSpecsApi = async (data) => {
  const url = '/api/specsinfo'
  return http.get(url,{params:{id:data}})
}

export const setSpecsApi = async (data) => {
  const url = '/api/specsedit'
  return http.post(url,data)
}

export const delSpecsApi = async (data) => {
  const url = '/api/specsdelete'
  return http.post(url,{ id: data })
}

export const getListApi = async (data) => {
  const url = '/api/specslist'
  return http.get(url,{ params: data })
}

export const getTotalPageApi = async () => {
    const url = '/api/specscount'
    return http.get(url)
  }